home *** CD-ROM | disk | FTP | other *** search
- ü
- Quick Fonts
- ~~~~~~~~~~~
- ý
- Have you ever written an AMOS program that requires a font from
- the disk, but when you are a HD user, for example, have to wait ages
- and ages whilst the computer looks through, and examines hundreds of
- fonts, whilst the program could be carrying on with something else?
- Well hopefully, you will be able to take care of this problem using
- the help and advice that I will be giving you in this little doc.
-
- þ
- This magazine boots with a fast-font maker. What it does, is
- change the assign value of FONTS:, to a totally new location, where
- only the fonts for the magazine are neede, and so saves a lot of time
- with the GET FONTS command. In order to preserve true valus, I take a
- reading of the original FONTS: path, and store it in memory so that I
- can re-assign it after all the necessary fonts have been read.
-
- ù
- To give you a small idea of what I am actually waffling on about,
- I shall explain exactly how I made the program work. When the program
- boots, I set the default path to the FONTS: drawer using DIR$, and
- store the value in memory. The true path will be stored in memory, not
- ÿ
- ù
- just the FONTS: that I assigned it. Now I have changed the path back
- to what it was when I booted up, and changed the FONTS: drawer to the
- cuurent path's FONTS drawer, where everything for the magazine is
- currently stored. Now I call GET FONTS, and change the original FONTS:
- setting back to normal, so that if the program quits, or is
- multitasking, then it will all call to the original FONTS: volume.
- Here is a simple program to demonstrate what I mean :
-
- û
- A$=Dir$ : Rem Boot Path
- Dir$="Fonts:" : B$=Dir$ : Rem Get Fonts Path
- Dir$=A$ : Rem Change path back.
- Assign "FONTS:" to A$+"/Fonts/" : Rem New Fonts Drawer
- Get Fonts : Rem Retrieve the fonts list.
- Set Font (All fonts to be used) : Rem Copys Fonts needed to mem.
- Assign "FONTS:" To B$ : Rem Return it all back to normal.
-
- ø
- See, dead simple! It is best that you use the SET FONT command on
- all the fonts that you need before you re-assign, as AMOS could look
- at the re-assigned original drawer, and discover it not there.
- Anyhow, once loaded into memory, they stay there until you quit out.
- ÿ
- ý
- Well folks, I think that is just about it for this simple little
- programming excercise. If you have any questions or queries, then why
- not drop me a line at this address :
-
- û
- Andrew "Mushroom" Kellett
- Mushroom PD
- 32 Castleton Crescent
- Gamesley
- Glossop
- Derbyshire
- SK13 9TH
- ENGLAND
-
- ý
- All letters received will be replied to as soon as possible. I
- will reply as an ASCII letter on a disk unless you state so otherwise.
-
- ú
- [Andrew "Mushroom" Kellett]
-
- ÷
- EOF
-
-